package com.zhuandaonet.manager.entity;

import com.zhuandaonet.manager.resp.RoleResp;
import com.zhuandaonet.springjpa.entity.EntityImpl;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.BeanUtils;

import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name="t_role")
@Getter
@Setter
public class RoleEntity extends EntityImpl<RoleResp> {
    private static final long serialVersionUID = 1247731959460738737L;

    /**
     * 角色名称
     */
    private String name;

    /**
     * 角色简介
     */
    private String remark;


    @Override
    public RoleResp toResp() {
        RoleResp resp = new RoleResp();
        BeanUtils.copyProperties(this,resp);
        return resp;
    }
}
